(function (){
    var login=document.querySelector('.login')
    var user=document.querySelector('.user')

    var out=user.querySelector('.out')

    // console.log(login, user,out)
    fn()
    out.onclick=function(){
        localStorage.removeItem('flag');
        fn()
    }

    function fn(){
        var flag=localStorage.getItem('flag');
        if(flag){
            login.style.display='none'
            user.style.display='inline-block'
        }
        else{
            login.style.display='inline-block'
            user.style.display='none'
        }
    }
})();